#ifndef MUTEX_H
#define MUTEX_H

#include "ISyncObject.h"
#include "Handle.h"
#include "NonCopyable.h"


#include <Windows.h>

namespace syncLib
{

    class Mutex : public ISyncObject, NonCopyable
    {
    public:
        explicit Mutex(BOOL bInitialOwner = TRUE);

        Mutex(BOOL bInitialOwner, LPCTSTR lpName);

        Mutex(LPSECURITY_ATTRIBUTES lpMutexAttributes,
            BOOL bInitialOwner,
            LPCTSTR lpName);

    public:
        virtual void Lock();
        virtual void UnLock();

    private:
        Handle mHandle_;
    };

};

#endif // MUTEX_H
